{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/addons/builder/css/base.css" media="all">
<style>
    .layui-form-item {
        margin-bottom: 15px !important;
        clear: both;
        *zoom: 1;
    }
</style>
<body>
<form action="{:url('save')}" class="layui-form v3-admin-form" id="form">
    {include file="public/arguments" /}
    <input type="hidden" name="id" value="{$info?$info.id:''}" />
    <div class="layui-fluid layui-anim layui-anim-fadein">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">
                <div class="layui-row" style="padding-top: 8px;">
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称 </label>
                        <div class="layui-input-block">
                            <input type="text" name="title" lay-verify="required" lay-reqtext="请输入名称"
                                   placeholder="请输入名称" value="{$info.title}" autocomplete="off" class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">图标</label>
                        {table:alone view='items/img' info='$info' form='["field" => "icon", "value" => 1]'/}
                    </div>
                    {if $info.id > 1}
                    <div class="layui-form-item">
                        <label class="layui-form-label">金额 </label>
                        <div class="layui-input-block">
                            <input type="number" name="amount" lay-verify="required" lay-reqtext="请输入金额"
                                   placeholder="请输入金额" value="{$info.amount}" autocomplete="off" class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">中奖概率 </label>
                        <div class="layui-input-inline">
                            <input type="number" name="odds" lay-verify="required" lay-reqtext="请输入中奖概率"
                                   placeholder="请输入中奖概率" value="{$info.odds*100}" autocomplete="off" class="layui-input" />
                        </div>
                        <div class="layui-form-mid layui-word-aux">%</div>
                    </div>
                    <input type="hidden" name="old_odds" value="{$info.odds}" />
                    {/if}
                </div>
            </div>
        </div>
    </div>
    {include file="public/submit" /}
</form>
</body>
{include file="public/footer" /}
</html>